<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- App favicon -->
    <link rel="shortcut icon" href="/assets/images/favicon.ico">

    <link href="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet">

    <!-- App css -->
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/icons.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/metismenu.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body class="container_12">
    <div class="box round first" style="margin:15px;">
        <h2>数据列表</h2>
        <div class="block">
            <div>
                <a class="btn btn-primary" href="/hotel/house/house/add.do">新增客房</a>
            </div>

            <table id="example" class="data display datatable">
                <thead>
                    <tr>
                        <th>客房名称</th>
                        <th>发布人</th>
                        <th>大小</th>
                        <th>位置</th>
                        <th>价格</th>
                        <th>会员价</th>
                        <th>客房类型</th>
                        <th>状态</th>
                        <th style="width: 150px;">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="even gradeA" th:each="item : ${list}">
                        <td th:text="${item.rooname}"></td>
                        <td th:text="${item.username}"></td>
                        <td th:text="${item.size}"></td>
                        <td th:text="${item.address}"></td>
                        <td th:text="${item.price}"></td>
                        <td th:text="${item.price2}"></td>
                        <td th:text="${item.cate}"></td>
                        <td th:if="${item.state == 1}">闲置</td>
                        <td th:if="${item.state == 2}">闲置</td>
                        <td>
                            <a th:href="@{'/hotel/house/house/edit.do?id=' + ${item.id}}">
                                <i class="icon-pencil"></i>
                                编辑
                            </a>
                            <a class="deletemodal"
                               th:href="@{'/hotel/house/house/delete.do?ret=list&id=' + ${item.id}}"><i
                                    class="icon-remove"></i>
                                移除
                            </a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!-- jQuery  -->
    <script src="/assets/js/jquery.min.js"></script>
    <script src="/assets/js/bootstrap.bundle.min.js"></script>
    <script src="/assets/js/metisMenu.min.js"></script>
    <script src="/assets/js/waves.min.js"></script>
    <script src="/assets/js/jquery.slimscroll.min.js"></script>

    <script src="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js"></script>
    <script src="/assets/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>

    <script src="/assets/plugins/moment/moment.js"></script>
    <script src="/assets/plugins/apexcharts/apexcharts.min.js"></script>        
    <script src="/assets/pages/jquery.dashboard.init.js"></script>
    <!-- App js -->
    <script src="/assets/js/app.js"></script>  
    <script src="/source/scripts/window.js"></script>
    <script src="/source/js.js"></script>
    <script>
        $().ready(function(){
            $(".uploadImg").click(function(){
                openWindow("/upload.jsp");
            });
            $("#thumb").on("input",function(){
                $(".oldImg").attr("src","/"+$("#thumb").val());
            });
        });
    </script>
</body>

</html>